package com.william.jdbcplus.boot.starter.util;

import com.william.jdbcplus.boot.starter.constant.DataSourceConstant;
import com.william.jdbcplus.core.ds.DynamicDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;

/**
 * @author niliwei
 */
public class DbUtil {

    public static final DynamicDataSource datasource = SpringContextUtil.getBean(DataSourceConstant.DYNAMIC);

    public static final JdbcTemplate jdbcTemplate = SpringContextUtil.getBean("jdbcTemplate");

    public static final NamedParameterJdbcTemplate namedParameterJdbcTemplate = SpringContextUtil.getBean("namedParameterJdbcTemplate");

}